There has conventionally been known a gas sensor which is attached to an exhaust pipe of an automobile or the like for use and which includes a detection element which generates an electromotive force the magnitude of which changes in accordance with the concentration of a particular gas, such as NOx (nitrogen oxides) or oxygen, contained in exhaust gas, or whose resistance changes in accordance with the concentration of the particular gas. In such a gas sensor, if a water droplet contained in exhaust gas adheres to the detection element when heated to a high temperature, the detection element may suffer damage, such as cracking, due to thermal shock. Therefore, a protector for covering the detection element is attached to the gas sensor so as to protect the detection element from adhesion of water (see, for example, Patent Document 1).